﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.ViewModels.GroupViewModel>" %>

<div id="toplinks" class="toplinks">
    <ul class="isuser">
        <% if (!Request.IsAuthenticated)
            { %>
            <li class="registertop"><%= Html.ActionLink("Đăng kí", "Register", "Account")%></li>
            <li>|</li>
			<li><%= Html.ActionLink("Đăng nhập", "LogOn", "Account")%></li>             
        <% }
            else
            { %>
            <li class="welcomelink"><span style="font-weight:bold; color:#ffffff;">Xin chào <a href="<%= Url.Action("ThongTinNguoiDung", "Account", new { username = Page.User.Identity.Name }) %>" style="text-decoration: underline;"><b><%= Page.User.Identity.Name%></b></a> &nbsp;&nbsp;&nbsp;|</span></li>
			<li><%= Html.ActionLink("Thoát ra", "LogOff", "Account")%></li>     
            <li>|</li>
			<li><%= Html.ActionLink("Thay đổi mật khẩu", "ChangePassword", "Account")%></li>    
        <% } %>
	</ul>
</div>
<div class="baner"> 
    <img height="122" width="976" src="../../../Content/Images/Items/<%= Model.ThongTinCongTyModel.GetModel.LstObjModel[0].Logo %>"  />			
</div>
<div class="menu">
    <div class="menu_top">						                        
        <div id="box_menu">
            <div id="uni_content_outer"><div id="uni_content"></div></div>
            <ul id="ddmenu" class="clearfix">
                <li id="tab_trangchu" class="active">
                    <a href="<%= Url.Action("Index", "Home") %>" class="item"><span>Trang chủ</span></a>
                </li>
                <li id="tab_gioithieu">
                    <a href="<%= Url.Action("GioiThieu", "Home") %>" class="item"><span>Giởi thiệu</span></a>
                </li>
                <li id="tab_tintuc">
                    <a href="<%= Url.Action("SelectTinTuc", "Home") %>" class="item"><span>Tin tức</span></a>
                    <ul class="subnav1 select-free">
                    <% for (int i = 0; i < Model.LoaiTinTucModel.GetModel.LstObjModel.Count; i++)
                       { %>
					    <li><a href="<%= Url.Action("SelectTinTucByLoaiTinTuc", "Home", new { idloaitintuc = Model.LoaiTinTucModel.GetModel.LstObjModel[i].ID }) %>"> <%= Model.LoaiTinTucModel.GetModel.LstObjModel[i].TenLoaiTinTuc %> </a></li>
                    <% } %>
                    </ul>
                </li>
                <li id="tab_phaply">
                    <% int phaply = -1;
                        for (int i = 0; i < Model.LoaiCamNangModel.GetModel.LstObjModel.Count; i++)
                       {
                           if (Model.LoaiCamNangModel.GetModel.LstObjModel[i].TenLoaiCamNang.ToUpper().Contains(WebConfiguration.PhapLy))
                           {
                               phaply = Model.LoaiCamNangModel.GetModel.LstObjModel[i].ID;
                               break; 
                           }
                       } %>
                    <a href="<%= Url.Action("SelectCamNangByLoaiCamNang", "Home", new { idloaicamnang = phaply }) %>" class="item"><span>Pháp lý</span></a>
                </li>
                <li id="tab_datnen">
                    <a href="#" class="item"><span>Đất nền</span></a>
                    <ul class="subnav1 select-free">
                    <% for (int i = 0; i < Model.LoaiBatDongSanModel.GetModel.LstObjModel.Count; i++)
                       {
                           if (Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].TenLoaiBatDongSan.ToUpper().Contains(WebConfiguration.DatNen))
                           {%>
					        <li><a href="<%= Url.Action("SelectNhaDatByLoaiBatDongSan", "Home", new { idloaibatdongsan = Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].ID }) %>"> <%= Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].TenLoaiBatDongSan %> </a></li>
                        <% }
                       } %>
                    </ul>
                </li>
                <li id="tab_canho">
                    <a href="#" class="item"><span>Căn hộ</span></a>
                    <ul class="subnav1 select-free">
                    <% for (int i = 0; i < Model.LoaiBatDongSanModel.GetModel.LstObjModel.Count; i++)
                       {
                           if (Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].TenLoaiBatDongSan.ToUpper().Contains(WebConfiguration.CanHo) ||
                               Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].TenLoaiBatDongSan.ToUpper().Contains(WebConfiguration.SanPham) ||
                               Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].TenLoaiBatDongSan.ToUpper().Contains(WebConfiguration.Nha))
                           {%>
					        <li><a href="<%= Url.Action("SelectNhaDatByLoaiBatDongSan", "Home", new { idloaibatdongsan = Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].ID }) %>"> <%= Model.LoaiBatDongSanModel.GetModel.LstObjModel[i].TenLoaiBatDongSan %> </a></li>
                        <% }
                       } %>
                    </ul>
                </li>
                <li id="tab_camnang">
                    <a href="<%= Url.Action("SelectCamNang", "Home") %>" class="item"><span>Cẩm nang</span></a>
                    <ul class="subnav1 select-free">
                    <% for (int i = 0; i < Model.LoaiCamNangModel.GetModel.LstObjModel.Count; i++)
                       {
                           if (!Model.LoaiCamNangModel.GetModel.LstObjModel[i].TenLoaiCamNang.ToUpper().Contains(WebConfiguration.PhapLy))
                           {%>
                           <li><a href="<%= Url.Action("SelectCamNangByLoaiCamNang", "Home", new { idloaicamnang = Model.LoaiCamNangModel.GetModel.LstObjModel[i].ID }) %>"> <%= Model.LoaiCamNangModel.GetModel.LstObjModel[i].TenLoaiCamNang%> </a></li>
                        <% }
                       }%>
                    </ul>
                </li>
                <li id="tab_lienhe">
                    <a href="<%= Url.Action("LienHe", "Home") %>" class="item"><span>Liên hệ</span></a>
                </li>
            </ul>
            <% using (Html.BeginForm("DangTin", "Home", FormMethod.Post, new { id = "SubmitDangTin" }))
               { %>
                <div id="menu_right_dangnhap">
                    <div class="login">
		                <p class="text">
                            <input type="hidden" name="NguoiDung_UserName" />
                            <a href="#" onclick="submitfrmDangTin();" class="link">
                                Đăng tin
				            </a>
                        </p>
				    </div>
                </div>
            <% } %>
        </div>
    </div>
</div>